// index.js
Page({
  data: {
    list: [],
    isShow: false
  },
  onLoad() {
    var set = setInterval(function () {
      clearInterval(set)
      this.setData({
        isShow: true
      })
    }, 2000)
    wx.request({
      url: 'http://route.showapi.com/1700-1?showapi_appid=1367085&showapi_sign=cb8507c33e4a43cfa34a954c91b91fd6',
      method: "GET",
      data: {},
      header: {
        'content-type': 'application/json'
      },
      success: (res) => {
        console.log(res);
        console.log(res.data.showapi_res_body.storylist);
        this.setData({
          list: res.data.showapi_res_body.storylist
        })
      },
      fail: (err) => {
        console.log(err);
      }
    })

  },
  changlist(e) {
    console.log(e.detail.value);
    var index = e.detail.value
    var id = this.data.list[index].classify
    wx.navigateTo({
      url: '../detail/detail?id=' + id,
    })
  }

})